// DlgSetColumn.cpp : implementation file
//

#include "stdafx.h"
#include "pdarx.h"
#include "DlgSetColumn.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDlgSetColumn dialog


CDlgSetColumn::CDlgSetColumn(CWnd* pParent /*=NULL*/)
	: CDialog(CDlgSetColumn::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDlgSetColumn)
	m_dAxisElev = 0.0;
	m_dAxisHigh = 0.0;
	m_dAxisPlw = 0.0;
	//}}AFX_DATA_INIT
	::AfxSetResourceHandle(g_ARXInstance);
}


void CDlgSetColumn::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDlgSetColumn)
	DDX_Text(pDX, IDC_EDIT_AXIS_ELEV, m_dAxisElev);
	DDX_Text(pDX, IDC_EDIT_AXIS_HIGH, m_dAxisHigh);
	DDX_Text(pDX, IDC_EDIT_AXIS_PLW, m_dAxisPlw);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDlgSetColumn, CDialog)
	//{{AFX_MSG_MAP(CDlgSetColumn)
	ON_WM_CREATE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDlgSetColumn message handlers

void CDlgSetColumn::OnOK() 
{
	// TODO: Add extra validation here
	UpdateData(TRUE);
	m_dAxisElev = m_dAxisElev * 1000;
	UpdateData(FALSE);
	CDialog::OnOK();
}

int CDlgSetColumn::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CDialog::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	::AfxSetResourceHandle(g_CADInstance);
	
	return 0;
}

BOOL CDlgSetColumn::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_dAxisElev = m_dAxisElev / 1000;
	m_dAxisHigh = m_dAxisHigh + m_dAxisElev;
	UpdateData(FALSE);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
